export const request = (params) => {
    return new Promise((resolve, reject) => {
        wx.request({
            url: params.url, 
            method:params.method,
            data:params.data,
            header: {
                'Content-Type': params.contentType ? params.contentType : 'application/x-www-form-urlencoded',
                "authorization":"Bearer "+wx.getStorageSync("token")
              },
            success: (res)=> {
                resolve(res)
            },
            fail: (err) => {
                reject(err)
            },
        })
    })
}